﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using SeleniumToolkit.Config;
using System.Reflection;

namespace SeleniumToolkit.NUnit
{
    [TestFixture]
    public class TestCaseBuilderTests
    {
        [Test]
        public void When_TestCase_Owns_Fixture_SeleniumFactory_Should_Create_Sessions_Per_Test()
        {
            var config = new SeleniumConfiguration();
            config.AddinSettings.RecylePerFixture = false;

            SuiteTester.RunAssembly("NUnit.TestAssembly.TestCaseScenario.dll", config, 3);
        }
    }

    [TestFixture]
    public class AssemblyTest
    {
        [Test]
        public void CountVisibleTypesInFixtureScenario()
        {
            Assembly assem = Assembly.Load("NUnit.TestAssembly.FixtureScenario");
            Console.WriteLine(assem.GetTypes().Length);
            foreach(Type t in assem.GetTypes())
            {
                Console.WriteLine(t);
            }
        }
    }
}
